//
//  UIApplication+DDAdd.swift
//  Spark Peso
//
//  Created by 小琦 on 2025/1/28.
//

import UIKit

extension UIApplication {
    
    var currentWindow: UIWindow? {
        // 获取当前活动的场景
        if let scene = connectedScenes.first(where: { $0 is UIWindowScene }) as? UIWindowScene {
            return scene.windows.first { $0.isKeyWindow }
        }
        return nil
    }
}
